import { MockMethod } from 'vite-plugin-mock';

export default [
    // 获取工作台汇总数据
    {
        url: '/mock/api/order/dashboard/getReportData',
        method: 'get',
        response() {
            return {
                code: '000000',
                data: {
                    driverCount: 278600,
                    totalMoney: 3984200,
                    orderCount: 1306000,
                    cityNum: 80
                },
                msg: 'success'
            };
        }
    },
    //获取折线图数据
    {
        url: '/mock/api/order/dashboard/getLineData',
        method: 'get',
        response() {
            return {
                code: '000000',
                data: {
                    label: ['4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月', '1月', '2月', '3月'],
                    order: [258, 838, 124, 274, 981, 575, 243, 94, 152, 813, 96, 9],
                    money: [443, 305, 202, 157, 538, 452, 560, 263, 43, 223, 713, 24]
                },
                msg: 'susccess'
            };
        }
    },
    //获取城市分布数据
    {
        url: '/mock/api/order/dashboard/getPieCityData',
        method: 'get',
        response() {
            return {
                code: '000000',
                data: [
                    {
                        value: 70,
                        name: '北京'
                    },
                    {
                        value: 19,
                        name: '上海'
                    },
                    {
                        value: 478,
                        name: '深圳'
                    },
                    {
                        value: 170,
                        name: '广州'
                    },
                    {
                        value: 458,
                        name: '杭州'
                    },
                    {
                        value: 464,
                        name: '武汉'
                    }
                ],
                msg: 'success'
            };
        }
    },
    //获取年龄分布数据
    {
        url: '/mock/api/order/dashboard/getPieAgeData',
        method: 'get',
        response() {
            return {
                code: '000000',
                data: [
                    {
                        value: 435,
                        name: '北京'
                    },
                    {
                        value: 754,
                        name: '上海'
                    },
                    {
                        value: 860,
                        name: '深圳'
                    },
                    {
                        value: 785,
                        name: '广州'
                    },
                    {
                        value: 757,
                        name: '杭州'
                    },
                    {
                        value: 286,
                        name: '武汉'
                    }
                ],
                msg: 'success'
            };
        }
    },
    // 获取雷达图数据
    {
        url: '/mock/api/order/dashboard/getRadarData',
        method: 'get',
        response() {
            return {
                code: '000000',
                data: {
                    indicator: [
                        {
                            name: '服务态度',
                            max: 10
                        },
                        {
                            name: '在线时长',
                            max: 600
                        },
                        {
                            name: '接单率',
                            max: 100
                        },
                        {
                            name: '评分',
                            max: 5
                        },
                        {
                            name: '关注度',
                            max: 10000
                        }
                    ],
                    data: [
                        {
                            value: [8, 300, 80, 4, 9000],
                            name: '司机模型诊断'
                        }
                    ]
                },
                msg: 'success'
            };
        }
    }
] as MockMethod[];
